<!-- 第三步 -->

<template>
  <div class="RepairList-step3">
    <FormSlot bind="resolverUserId" tip="请选择处理人" noLabel noMargin>
      <ChooseUserOne :obj="one" bind="user" :organId="one.user.organId[0]" repair @change="toChange" />
    </FormSlot>
  </div>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'Step3',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb('add')],

  /**
   * 本地方法 (轻量重要在前)
   */
  methods: {
    /**
     * 点击复选
     */
    toChange({ uaaUserId, name, phone, organId }) {
      CORE.merge(this.one, {
        resolverUserId: uaaUserId,
        resolverUserName: name,
        resolverUserPhone: phone,
        user: { uaaUserId, name, phone, organId: [organId[0]] }, // 指派人
      })
    },
  },
}
</script>

<style lang="scss">
@import './index.scss';
</style>
